package com.mojo.jvm;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * OOM示例,Jprofiler使用
 *
 * @author <a href="mailto:sjj@jianzhimao.com">mojo</a>
 * copyright (C), 2013-2021, 广州九尾信息科技有限公司
 * @date 2021/8/23 10:24
 */
public class OOMDemo {
    static byte[] bytes = new byte[1024 * 1024];

    public static void main(String[] args) {
        //int count = 0;
        //
        //List<Object> list = new ArrayList<>();
        //while (true) {
        //    list.add(bytes);
        //    count++;
        //}
        System.out.println(System.getProperty("file.encoding"));
        System.out.println(System.getProperty("jdk.http.auth.tunneling.disabledSchemes"));
        Integer[] ints = new Integer[]{1, 2, 3};
        ArrayList<Integer> list = new ArrayList<>(ints.length);
        List<Integer> integers = Arrays.asList(ints);
        for (Integer integer : integers) {
            System.out.println(integer);
        }

    }

}
